#ifndef WORD_H
#define WORD_H

#include <stdio.h>
#include <cmath>
#include <string>
#include <vector>
#include "PamImage.h"

using namespace std;

class Word
{
  public:
    Word(int top, int bottom, int left, int right, int shear, string text, int lineNr, int wordNr, string documentName);
    Word();
    ~Word();
    
    int top;
    int left;
    int bottom;
    int right;
    int shear; 
    string text;
    double score;
    PamImage image;    
    
    int lineNumber;
    int wordNumber;
    string documentName;
    
    int width();
    
    int height();

    double xcorr();

    void set_lower_left(int l);

    double get_lower_left();

    double get_lower_right();
        
    void set_lower_right(int r);

    void set_real_pos(int l, int w);
        
    void resize_up(int amount);

    bool overlaps(Word* other);
    bool overlapsWithMargin(Word* other, int margin);
    
    Word clone();
};

#endif